package commons.exceptions;

import server.utilities.UploadMessage;

/**
 * Exception that may occur while uploading a file
 * @author Romain Pellerin
 */
public class UploadException extends Exception {
	
	private static final long serialVersionUID = -6296683513244648623L;
	private UploadMessage error;
	
	public UploadException(UploadMessage error) {
		super(error.getMessage());
		this.error = error;
	}
	
	/**
	 * Returns the error
	 * @return The error
	 */
	public UploadMessage getError() {
		return this.error;
	}
}
